import request from '@/utils/request'

// 获取首页统计数据
export function getStats() {
  return request({
    url: '/customer/dashboard/stats',
    method: 'get'
  })
}

// 获取物候期数据
export function getPhenologyData() {
  return request({
    url: '/customer/dashboard/phenology',
    method: 'get'
  })
}

// 获取最新预警记录
export function getLatestWarnings() {
  return request({
    url: '/customer/dashboard/latestWarnings',
    method: 'get'
  })
}

// 默认导出对象
const dashboardAPI = {
  getStats,
  getPhenologyData,
  getLatestWarnings
}

export default dashboardAPI